package org.megha.blog.example.threads;

public class ThreadSafeCounter extends ThreadUnsafeCounter {

	// synchronized makes it safe to call increment() in different threads without
	// explicit locking/synchronization. the jvm with assure that only one call of
	// increment() on an instance of ThreadSafeCounter is running at any given time.
	@Override
	synchronized public void increment() {
		super.increment();
	}
}
